package com.zyt.controller;

import com.zyt.pojo.LogParam;
import com.zyt.pojo.OperateLog;
import com.zyt.pojo.PageResult;
import com.zyt.pojo.Result;
import com.zyt.service.EmpService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    private EmpService empService;

    @GetMapping("/page")
    public Result LogPage(LogParam logParam) {
        log.info("日志操作信息分页查询:{}", logParam);
        PageResult<OperateLog> log = empService.selectLog(logParam);
        return Result.success(log);
    }
}
